package com.applications.codemash.utility.parser;

import java.io.InputStream;
import java.net.URL;
import java.util.List;


public abstract class BaseFeedParser<T>
{
	private String _requestURL;
	public abstract List<T> parse();
	
	protected BaseFeedParser(String requestUrl)
	{
		_requestURL = requestUrl;
	}
	
	protected InputStream getInputStream()
	{
		try
		{
			return new URL(_requestURL).openConnection().getInputStream();
		}
		catch (Exception iex)
		{
			throw new RuntimeException(iex);
		}
	}
}
